Categories

Versions

Generate Prompts (Generative Models)

Synopsis

Generate prompts based on a template and the input data

Description

This operator generates a new column and adds it to the input data set. The values of this column are generated based on the provided prompt template text. Regular text is kept as is. You can refer to the values of a column in your input data with [[column_name]].

Input

  • data (Data table)

    The input data to which the new prompt column will be added.

Output

  • data (Data table)

    The resulting data set including the new prompt column.

Parameters

  • name The name of the new column containing the resulting prompts.
  • prompt The prompt template. Normal text is used as is. You can refer to the values of the columns of the input data with [[column_name]].
  • conda environment The conda environment used for this task. Please refer to the extension documentation for additional details on this and on version requirements for Python and all used packages in this environment.

Tutorial Processes

Generate a Metaprompt for Retrieval Augmented Generation (RAG)

This tutorial generates a simple data set with just a few rows and columns. It then generates a multi-line prompt based on the Question column as well as two Context columns. This approach is often used for Retrieval Augmented Generation (RAG) and can help to make answers from a Gen AI model more relevant and less prone to hallucination - without the need for finetuning the model.